\(\int \frac {A+B x}{\sqrt {a+b x^2}} \, dx\) [25]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 43 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\frac {B \sqrt {a+b x^2}}{b}+\frac {A \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}} \]

[Out]

A*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(1/2)+B*(b*x^2+a)^(1/2)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {655, 223, 212} \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\frac {A \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}+\frac {B \sqrt {a+b x^2}}{b} \]

[In]

Int[(A + B*x)/Sqrt[a + b*x^2],x]

[Out]

(B*Sqrt[a + b*x^2])/b + (A*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {B \sqrt {a+b x^2}}{b}+A \int \frac {1}{\sqrt {a+b x^2}} \, dx \\ & = \frac {B \sqrt {a+b x^2}}{b}+A \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right ) \\ & = \frac {B \sqrt {a+b x^2}}{b}+\frac {A \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.07 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\frac {B \sqrt {a+b x^2}}{b}-\frac {A \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {b}} \]

[In]

Integrate[(A + B*x)/Sqrt[a + b*x^2],x]

[Out]

(B*Sqrt[a + b*x^2])/b - (A*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/Sqrt[b]

Maple [A] (verified)

Time = 3.38 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.86

method result size
default \(\frac {A \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}+\frac {B \sqrt {b \,x^{2}+a}}{b}\) \(37\)
risch \(\frac {A \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}+\frac {B \sqrt {b \,x^{2}+a}}{b}\) \(37\)

[In]

int((B*x+A)/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

A*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)+B*(b*x^2+a)^(1/2)/b

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.14 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\left [\frac {A \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, \sqrt {b x^{2} + a} B}{2 \, b}, -\frac {A \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - \sqrt {b x^{2} + a} B}{b}\right ] \]

[In]

integrate((B*x+A)/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(A*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*sqrt(b*x^2 + a)*B)/b, -(A*sqrt(-b)*arctan(
sqrt(-b)*x/sqrt(b*x^2 + a)) - sqrt(b*x^2 + a)*B)/b]

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.65 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\begin {cases} A \left (\begin {cases} \frac {\log {\left (2 \sqrt {b} \sqrt {a + b x^{2}} + 2 b x \right )}}{\sqrt {b}} & \text {for}\: a \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {b x^{2}}} & \text {otherwise} \end {cases}\right ) + \frac {B \sqrt {a + b x^{2}}}{b} & \text {for}\: b \neq 0 \\\frac {A x + \frac {B x^{2}}{2}}{\sqrt {a}} & \text {otherwise} \end {cases} \]

[In]

integrate((B*x+A)/(b*x**2+a)**(1/2),x)

[Out]

Piecewise((A*Piecewise((log(2*sqrt(b)*sqrt(a + b*x**2) + 2*b*x)/sqrt(b), Ne(a, 0)), (x*log(x)/sqrt(b*x**2), Tr
ue)) + B*sqrt(a + b*x**2)/b, Ne(b, 0)), ((A*x + B*x**2/2)/sqrt(a), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.67 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\frac {A \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} + \frac {\sqrt {b x^{2} + a} B}{b} \]

[In]

integrate((B*x+A)/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

A*arcsinh(b*x/sqrt(a*b))/sqrt(b) + sqrt(b*x^2 + a)*B/b

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.91 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=-\frac {A \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{\sqrt {b}} + \frac {\sqrt {b x^{2} + a} B}{b} \]

[In]

integrate((B*x+A)/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

-A*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a)))/sqrt(b) + sqrt(b*x^2 + a)*B/b

Mupad [B] (verification not implemented)

Time = 5.92 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84 \[ \int \frac {A+B x}{\sqrt {a+b x^2}} \, dx=\frac {B\,\sqrt {b\,x^2+a}}{b}+\frac {A\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}} \]

[In]

int((A + B*x)/(a + b*x^2)^(1/2),x)

[Out]

(B*(a + b*x^2)^(1/2))/b + (A*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(1/2)